namespace LeanAndon.Services
{
    using System;
    using System.Collections.Generic;

    using Library.Domain;
    using Library.Repository.Spec;

    public class ProjectService : IProjectService
    {
        private readonly IProjectRepository projectRepository;

        public ProjectService()
        {          
        }

        public ProjectService(IProjectRepository projectRepository)
        {
            this.projectRepository = projectRepository;
        }

        public ProjectResponse GetActiveProjects()
        {
            var projects = this.projectRepository.ReadAll();


            return new ProjectResponse { Projects = Assembler.AssembleProjects(projects) };
        }
    }
}